package com.szh.mysobproject.paging.source.msg.factory

import com.szh.mysobproject.http.ServiceCreator
import com.szh.mysobproject.http.request.api.MsgApi
import com.szh.mysobproject.model.ApiResponse
import com.szh.mysobproject.paging.source.msg.impl.IMsgPageData

/**
 * @author : create by  szh
 * @date : 2022/7/12 15:08
 * @desc :@我的消息 列表工厂
 */

class AtMeMsgListFactory : AbstractMsgListFactory() {

    private val msgApi = ServiceCreator.create<MsgApi>()

    @Suppress("UNCHECKED_CAST")
    override suspend fun createMsgListByType(page: Int): ApiResponse<IMsgPageData> {
        return msgApi.getAtMeMsgList(page) as ApiResponse<IMsgPageData>
    }
}